﻿@model WidgetBarModel

@if (Html.WidgetBarVisible()) { 
<div class="widgetbar"> 
	<ul class="widget-ul"> 
		@foreach (var instanceId in Model.WidgetIds ){ 		
			Html.RenderAction("View", "Widget", new { id = instanceId });
		}
	</ul>
	@if (User.IsAdmin()) { 
		using (Html.BeginForm("Add", "Widget")) {     
			<div class="widget-add"> 
				<input id="column" name="column" type="hidden" value="@Model.Column" />
				@Html.DropDownList("slug", Model.RegisteredWidgets)            
				<input type='submit' value='@Strings.Add' id='btnAddWidget'/> 
			</div>      
		} 
	 } 
</div>
}
